﻿namespace K9Nano.Updater;

/// <summary>
/// 版本元数据
/// </summary>
public class ReleaseMetadata
{
    /// <summary>
    /// 版本号
    /// </summary>
    public Version Version { get; set; }

    /// <summary>
    /// 强制更新
    /// </summary>
    public bool Force { get; set; }

    /// <summary>
    /// 发布日志
    /// </summary>
    public string? ReleaseLogUri { get; set; }

    /// <summary>
    /// 更新文件校验类型
    /// </summary>
    public EFileChecksumType ChecksumType { get; set; }

    /// <summary>
    /// 更新文件列表
    /// </summary>
    public List<TargetFile> Files { get; set; }

    /// <summary>
    /// 更新前执行的命令
    /// </summary>
    public string? PreCommand { get; set; }

    /// <summary>
    /// 更新前执行的命令参数
    /// </summary>
    public string? PreCommandArgs { get; set; }

    /// <summary>
    /// 更新后执行的命令
    /// </summary>
    public string? PostCommand { get; set; }

    /// <summary>
    /// 更新后执行的命令参数
    /// </summary>
    public string? PostCommandArgs { get; set; }
}
